THE FOLLOWING WAS DOWNLOADED FROM THE AWAUG BBS, 24 HRS. 202-561-2475 and appeared and is going to appear in the excellent AWAUG newsletter.  We thank AWAUG for sharing this information with us.
 
 RECOVERING LOST PROGRAMS:
      WHAT YOU CAN DO IF YOU WERE
       TOO LAZY TO KEEP A BACKUP
 
          by Michael McGrath
 
     On March 15, (the ides of March) 
 three days before the regional 
 science fair, I was working on my 
 science fair project.  My project 
 happens to be in computer science, so 
 I was busy programming with my Adam 
 computer.  That night I revised my 
 project a lot, so, like any good 
 programmer would, I prepared to make 
 several bAckups of this new version.  
 I did this by first destroying my old 
 backups, so that I could make them 
 into new backups.  This should have 
 worked just fine, but somewhere along 
 the line, I accidentally put the 
 master copy of my science fair 
 project into the disk drive, and 
 erased the first 96 blocks of the 
 disk.
     Whoops!  First I double checked 
 to make sure that I really had 
 destroyed the first 96 blocks of my 
 master disk, and tha4 I was not just 
 imagining things.  Then I checked to 
 see if I had really initialized all 
 of my old backups, and looked on the 
 floor to see I might have dropped an 
 old backup and accidentally skipped 
 initializing it.  Nope.
     his situation might not occur 
 very often, but it sure hurts when it 
 does.  So now I'll tell you how you 
 can get yourself out of a mess like 
 this.  I had to get all of the infor-
 mation on that disk back in three 
 days, and I knew of two ways that 
 this could be done: 1) write it all 
 over again, or 2) try to recover the 
 information from the ruined disk.  
 Because I had put about 300 hours of 
 work into writing what was on that 
 disk, and because there are only 72 
 hours for every three days, I 
 selected the second option.
     From what I learned so far, a 
 disk is basically divided into three 
 parts:  the boot block, the directory 
 blocks, and the blocks where files 
 are stored (I not sure what the 
 technical name for them is).  The 
 boot block is block zero, and after 
 that comes the directory blocks, and 



 after that comes the files.  What we 
 are interested in right now are the 
 director9 blocks.  When you tell the 
 computer to load a certain file, the 
 computer looks in the directory to 
 find where that file is located on 
 your disk.  If the file you named in 
 not listed in the directory, or the 
 directory tells the computer that the 
 file is located in a place where it 
 isn't, the file cannot be loaded.  
 When I accidentally destroyed the 
 first 96 blocks of my disk, I wiped 
 out the directory blocks; so even 
though most of my files were still on 
the disk, the computer was unable to 
load them.  To get them back, I had to 
rewrite the directory.
    Two programs proved essential in 
the recovery of my data.  The first 
one was the program Uncle Ernie's 
Toolkit.  The seco.d one was 
Filemanager by Tony Morehen.  The 
first step to recovering your data is 
to make a complete backup of your 
ruined disk.  When I say complete, I 
mean that you should do a block copy of 
the entire ruined disk onto a new disk. 
Next, use Uncle Ernie's Toolkit to 
search all over your ruined disk for 
the files that you want to recover.  
This can be done with Uncle Ernie's Tool- 
kit using the BLOCKPEEK option.  If 
you are searching for a BASIC file, it 
should bE easy to find.  This is 
because BASIC files are stored in 
ASCII format, and you will be able to 
see the exact contents of the file.  
If you are searching for a file that is 
stored in binary format, the search 
will be much harder.  Some-
 times you just have to make a good 
 guess at where the file is located.  
 Once you have found the file on your 
 disk, take note of the following 
 things:
      1) The block that the file 
 starts in.
      2) The number of blocks that 
 file covers.
      3) The number of bytes which 
 are used in the last block.
     I found that numbers one and two 
 are pretty easy to find out; it's 
 number three that's tough.



     Once you've got all this informa-
 tion, you are ready to start using 
 Filemanager.  Filemanager has a very 
 nice feature in it, which lets you 
 edit and create your own directories.  
 It is really very easy to use, and I 
 won't bother to explain how to use it 
 in detail.  Once you boot up Fileman-
 ager, press Smartkey 1 for options. 
 Then select the Edit Directory 
 option.  You should have the names of 
 the files that you want to recover, 
 the blocks that they start in, the 
 number of blocks that they occupy, 
 and the number of bytes used in the 
 last block; enter all this in the 
 appropriate spaces.  Once you have 
 finished writing your new directory, 
 save it to the BACKUP of your ruined 
 disk.
     Now here's the comes the part 
 which can be either happy or heart-
 breaking.  Try to load one of your 
 programs.  If everything in the direc-
 tory is set correctly, the file 
 should load just fine.  If not, some 
 strange things might start to happen, 
 so make sure that you are using a 
 backup.  I found that when the file 
 did not load, my printer would 
 usually start printing random charac-
 ters, or that my data drives would 
 suddenly start spinning.  If it 
 doesn't work (and on the first try, 
 it probably won't), then try again.  
 As I've already said, finding the 
 number of bytes being used in the 
 last block is hard, and that is 
 probably what you have wrong.
     The process of recovering all my 
 files took me two days, because I was 
 very unfamiliar with what I had to 
 do.  If it ever happens again, it 
 will probably take less time.  
 However, since March 15 I have been 
 keeping double backups of all my 
 important programs.  Backups are by 
 far the safest and easiest way to 
 keep from losing important data.  
 (Words to live by!..Ed) 

